package com.cgnpc.scp.purchase.mybatis.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cgnpc.scp.common.bean.MyPageRequest;
import com.cgnpc.scp.common.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@TableName(value = "tbl_purchase_contract_item")
public class PurchaseContractItem extends MyPageRequest {
    /**
     * 物项类型；1为基础数据新增的合同物项；
     */
    public static final int ITEMTYPE_1_CONTRACT = 1;

    /**
     * 物项类型；2为非合同审批流程新增的合同物项；
     */
    public static final int ITEMTYPE_2_NOT_CONTRACT = 2;

    @TableId
    private String id;

    private String procInstId;

    private String contractNo;

    private String contractName;

    private String serialNumber;

    private String project;

    private String serviceName;

    private String specification;

    private Integer num;

    private String unit;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date requiredArrivalTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date plannedCompletionTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    private String createUser;

    private String createUserName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastUpdateTime;

    private String lastUpdateUser;

    private String lastUpdateUserName;

    private String projectId;

    private String contractId;

    private Integer itemType;

    private String currency;

    private BigDecimal amountMoney;

    private BigDecimal hanshuidj;

    private BigDecimal buhanshuidj;

    private String fixedassets;

    private String reason;

    private String scientificresearchproject;



    // begin 自定义字段
    @TableField(exist = false)
    private List<String> ids;
    @TableField(exist = false)
    private String projectCode; // 项目编码
    @TableField(exist = false)
    private String projectName; // 项目名称
    // end 自定义字段

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getProcInstId() {
        return procInstId;
    }

    public void setProcInstId(String procInstId) {
        this.procInstId = procInstId == null ? null : procInstId.trim();
    }

    public String getContractNo() {
        return contractNo;
    }

    public void setContractNo(String contractNo) {
        this.contractNo = contractNo == null ? null : contractNo.trim();
    }

    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName == null ? null : contractName.trim();
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber == null ? null : serialNumber.trim();
    }

    public String getProject() {
        return project;
    }

    public void setProject(String project) {
        this.project = project == null ? null : project.trim();
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName == null ? null : serviceName.trim();
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification == null ? null : specification.trim();
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit == null ? null : unit.trim();
    }

    public Date getRequiredArrivalTime() {
        return DateUtil.cloneNewDate(requiredArrivalTime);
    }

    public void setRequiredArrivalTime(Date requiredArrivalTime) {
        this.requiredArrivalTime = DateUtil.cloneNewDate(requiredArrivalTime);
    }

    public Date getPlannedCompletionTime() {
        return DateUtil.cloneNewDate(plannedCompletionTime);
    }

    public void setPlannedCompletionTime(Date plannedCompletionTime) {
        this.plannedCompletionTime = DateUtil.cloneNewDate(plannedCompletionTime);
    }

    public Date getCreateTime() {
        return DateUtil.cloneNewDate(createTime);
    }

    public void setCreateTime(Date createTime) {
        this.createTime = DateUtil.cloneNewDate(createTime);
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName == null ? null : createUserName.trim();
    }

    public Date getLastUpdateTime() {
        return DateUtil.cloneNewDate(lastUpdateTime);
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = DateUtil.cloneNewDate(lastUpdateTime);
    }

    public String getLastUpdateUser() {
        return lastUpdateUser;
    }

    public void setLastUpdateUser(String lastUpdateUser) {
        this.lastUpdateUser = lastUpdateUser == null ? null : lastUpdateUser.trim();
    }

    public String getLastUpdateUserName() {
        return lastUpdateUserName;
    }

    public void setLastUpdateUserName(String lastUpdateUserName) {
        this.lastUpdateUserName = lastUpdateUserName == null ? null : lastUpdateUserName.trim();
    }

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId == null ? null : projectId.trim();
    }

    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId == null ? null : contractId.trim();
    }

    public Integer getItemType() {
        return itemType;
    }

    public void setItemType(Integer itemType) {
        this.itemType = itemType;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency == null ? null : currency.trim();
    }

    public BigDecimal getAmountMoney() {
        return amountMoney;
    }

    public void setAmountMoney(BigDecimal amountMoney) {
        this.amountMoney = amountMoney;
    }

    public BigDecimal getHanshuidj() { return hanshuidj;}

    public void setHanshuidj(BigDecimal hanshuidj) { this.hanshuidj = hanshuidj; }

    public BigDecimal getBuhanshuidj() {return buhanshuidj; }

    public void setBuhanshuidj(BigDecimal buhanshuidj) { this.buhanshuidj = buhanshuidj; }

    public List<String> getIds() {
        return ids;
    }

    public void setIds(List<String> ids) {
        this.ids = ids;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getFixedassets() {
        return fixedassets;
    }

    public void setFixedassets(String fixedassets) {
        this.fixedassets = fixedassets;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getScientificresearchproject() {
        return scientificresearchproject;
    }

    public void setScientificresearchproject(String scientificresearchproject) {
        this.scientificresearchproject = scientificresearchproject;
    }
}